import Vue from 'vue';
import Vuex from 'vuex';
Vue.use(Vuex);

const state = {
  // 头像地址
  headPortrait: '',
  headName: '',
  headPhone: '',
  headEmail: '',
  headType: ''
};

const mutations = {
  changeHeadPortrait (state, data) {
    state.headPortrait = data.real_avatar;
    state.headName = data.name;
    state.headPhone = data.phone;
    state.headEmail = data.email;
    state.headType = data.reg_type;
  }
};

export default new Vuex.Store({
  state,
  mutations
});
